global root "C:\Users\hanwa\Desktop\replication"

use "$root\data\IMC_HA_Yearly_Panel_clean.dta", replace

preserve
drop if startyear==-1
keep if cem_matched==1
stackedev lnexpend imc , cohort(startyear) time(year) never_treat(no_treat) unit_fe(code) clust_unit(code) 
outreg2 using "$root\tables\table2", excel symbol(***,**,*) se replace
restore

preserve
drop if startyear==-1
keep if cem_matched==1
stackedev lnexpend imc , cohort(startyear) time(year) never_treat(no_treat) unit_fe(code) clust_unit(code)  covariates (deficit_rate grant_dependence lnpop lnclaim lnwage )
outreg2 using "$root\tables\table2", excel symbol(***,**,*) se append
restore

preserve
drop if startyear==-1
keep if cem_matched==1
stackedev lnexpend imc , cohort(startyear) time(year) never_treat(no_treat) unit_fe(code) clust_unit(code)  covariates (deficit_rate grant_dependence lnpop lnclaim lnwage  kids private umemploy pension vulnerable )
outreg2 using "$root\tables\table2", excel symbol(***,**,*) se append
restore

preserve
drop if startyear==-1
keep if cem_matched==1
stackedev lnexpend imc , cohort(startyear) time(region_y) never_treat(no_treat) unit_fe(code) clust_unit(code)  covariates (deficit_rate grant_dependence lnpop lnclaim lnwage  kids private umemploy pension vulnerable )
outreg2 using "$root\tables\table2", excel symbol(***,**,*) se append
restore

preserve
drop if startyear==-1
keep if cem_matched==1
stackedev lnexpend imc_small imc_nosmall , cohort(startyear) time(year) never_treat(no_treat) unit_fe(code) clust_unit(code) 
outreg2 using "$root\tables\table2", excel symbol(***,**,*) se append
restore

preserve
drop if startyear==-1
keep if cem_matched==1
stackedev lnexpend imc_small imc_nosmall , cohort(startyear) time(year) never_treat(no_treat) unit_fe(code) clust_unit(code)  covariates (deficit_rate grant_dependence lnpop lnclaim lnwage )
outreg2 using "$root\tables\table2", excel symbol(***,**,*) se append
restore

preserve
drop if startyear==-1
keep if cem_matched==1
stackedev lnexpend imc_small imc_nosmall , cohort(startyear) time(year) never_treat(no_treat) unit_fe(code) clust_unit(code)  covariates (deficit_rate grant_dependence lnpop lnclaim lnwage  kids private umemploy pension vulnerable )
outreg2 using "$root\tables\table2", excel symbol(***,**,*) se append
restore

preserve
drop if startyear==-1
keep if cem_matched==1
stackedev lnexpend imc_small imc_nosmall , cohort(startyear) time(region_y) never_treat(no_treat) unit_fe(code) clust_unit(code)  covariates (deficit_rate grant_dependence lnpop lnclaim lnwage  kids private umemploy pension vulnerable )
outreg2 using "$root\tables\table2", excel symbol(***,**,*) se append
restore

preserve
drop if startyear==-1
keep if cem_matched==1
stackedev lnexpend imc_smallc imc_nosmallc , cohort(startyear) time(year) never_treat(no_treat) unit_fe(code) clust_unit(code) 
outreg2 using "$root\tables\table2", excel symbol(***,**,*) se append
restore

preserve
drop if startyear==-1
keep if cem_matched==1
stackedev lnexpend imc_smallc imc_nosmallc , cohort(startyear) time(year) never_treat(no_treat) unit_fe(code) clust_unit(code)  covariates (deficit_rate grant_dependence lnpop lnclaim lnwage )
outreg2 using "$root\tables\table2", excel symbol(***,**,*) se append
restore

preserve
drop if startyear==-1
keep if cem_matched==1
stackedev lnexpend imc_smallc imc_nosmallc , cohort(startyear) time(year) never_treat(no_treat) unit_fe(code) clust_unit(code)  covariates (deficit_rate grant_dependence lnpop lnclaim lnwage  kids private umemploy pension vulnerable )
outreg2 using "$root\tables\table2", excel symbol(***,**,*) se append
restore

preserve
drop if startyear==-1
keep if cem_matched==1
stackedev lnexpend imc_smallc imc_nosmallc , cohort(startyear) time(region_y) never_treat(no_treat) unit_fe(code) clust_unit(code)  covariates (deficit_rate grant_dependence lnpop lnclaim lnwage  kids private umemploy pension vulnerable )
outreg2 using "$root\tables\table2", excel symbol(***,**,*) se append
restore
